<?php

include_once("inc/ExtArray.php");
include_once("inc/Table.php");
include_once("inc/DB.php");
//include_once("testdb_db.php");

include_once("inc/DBTable.php");

// Update an existing entity
/*$person = new person();
$person->UserId(31)->single();
echo "Old Name = " . $person->Name();

$person->name("John Smith")->save();
echo "<br />New Name = " . $person->Name();*/


$person = new Person();
$result = $person->where("Name", "John Smith")->single();

echo "Salary = " . $person->salary();


/*if(count($result) > 1)
{
	foreach($result as $res)
	{
		echo "
			Name: {$res->Name()}<br />
			Birthdate: {$res->Birthdate()}<br /><br />
		";
	}
}
else
{
	echo "
		Name: {$result->Name()}<br />
		Birthdate: {$result->Birthdate()}
	";
}

$job = new Job();
$job->JobID(1);
$job = $job->single();

echo "<br />Title = " . $job->Title();
*/
	
// Insert a new entity
/*$person = new Person();
$person
	->Name("Bob Dole")
	->Birthdate("")
	->Salary(14.5)
	->save();*/

?>